﻿using System;
using System.Collections.Generic;
using System.Text;

namespace OrderExer
{
    internal class Customer
    {
        private string name;//客户名字
        private string age;//客户年龄

        public Customer(string name,string age)
        {
            this.name = name;
            this.age = age;
        }

        public override bool Equals(object obj)
        {
            return obj is Customer customer &&
                   age == customer.age;
        }

        public override int GetHashCode()
        {
            return HashCode.Combine(age);
        }

        public override string ToString()
        {
            return "年龄:" + this.age;
        }
    }
}
